package com.ethink.order.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ethink.order.api.info.TobSaleDetailOrderInfo;
import com.ethink.order.api.model.TobSaleOrderAndReturnModel;
import com.ethink.order.api.request.TobOrderSettleUpdateRequest;
import com.ethink.order.common.entity.TobSaleDetailOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * TOB销售详单 Mapper接口
 *
 * @author default
 * @date 2022-11-16
 */
@Mapper
public interface TobSaleDetailOrderMapper extends BaseMapper<TobSaleDetailOrder> {

    List<TobSaleDetailOrderInfo> selectTobSaleDetailByOrderNo(String orderNo);

    List<String> queryDetailOrderNoByOrderNo(@Param("orderNos") List<String> orderNos);

    /**
     *
     * @param mateSkuList
     * @param saleSubChannel
     * @param poList 判空
     * @return
     */
    List<TobSaleOrderAndReturnModel> queryToBeSettleDetail(@Param("skuList") List<String> mateSkuList
            ,@Param("channel") String saleSubChannel,@Param("poList") List<String> poList);

    /**
     * 唯品结算查询
     * @param mateSkuList
     * @param saleSubChannel
     * @param poAndSkuList
     * @return
     */
    List<TobSaleOrderAndReturnModel> queryToBeSettleDetailByPo(@Param("skuList") List<String> mateSkuList
            ,@Param("channel") String saleSubChannel,@Param("poAndSkuList") List<String> poAndSkuList);
}